Integrand size = 21, antiderivative size = 84 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {\left (a g^2+c f (e f-2 d g)\right ) (f+g x)^{1+n}}{g^3 (1+n)}-\frac {2 c (e f-d g) (f+g x)^{2+n}}{g^3 (2+n)}+\frac {c e (f+g x)^{3+n}}{g^3 (3+n)} \]
[Out]
Time = 0.03 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {712} \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {(f+g x)^{n+1} \left (a g^2+c f (e f-2 d g)\right )}{g^3 (n+1)}-\frac {2 c (e f-d g) (f+g x)^{n+2}}{g^3 (n+2)}+\frac {c e (f+g x)^{n+3}}{g^3 (n+3)} \]
[In]
[Out]
Rule 712
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\left (a g^2+c f (e f-2 d g)\right ) (f+g x)^n}{g^2}+\frac {2 c (-e f+d g) (f+g x)^{1+n}}{g^2}+\frac {c e (f+g x)^{2+n}}{g^2}\right ) \, dx \\ & = \frac {\left (a g^2+c f (e f-2 d g)\right ) (f+g x)^{1+n}}{g^3 (1+n)}-\frac {2 c (e f-d g) (f+g x)^{2+n}}{g^3 (2+n)}+\frac {c e (f+g x)^{3+n}}{g^3 (3+n)} \\ \end{align*}
Time = 0.11 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.87 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {(f+g x)^{1+n} \left (\frac {a g^2+c f (e f-2 d g)}{1+n}-\frac {2 c (e f-d g) (f+g x)}{2+n}+\frac {c e (f+g x)^2}{3+n}\right )}{g^3} \]
[In]
[Out]
Time = 0.47 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.75
method | result | size |
gosper | \(\frac {\left (g x +f \right )^{1+n} \left (c e \,g^{2} n^{2} x^{2}+2 c d \,g^{2} n^{2} x +3 c e \,g^{2} n \,x^{2}+8 c d \,g^{2} n x -2 c e f g n x +2 e \,x^{2} c \,g^{2}+a \,g^{2} n^{2}-2 c d f g n +6 c d \,g^{2} x -2 c e f g x +5 a \,g^{2} n -6 c d f g +2 c e \,f^{2}+6 a \,g^{2}\right )}{g^{3} \left (n^{3}+6 n^{2}+11 n +6\right )}\) | \(147\) |
norman | \(\frac {c e \,x^{3} {\mathrm e}^{n \ln \left (g x +f \right )}}{3+n}+\frac {f \left (a \,g^{2} n^{2}-2 c d f g n +5 a \,g^{2} n -6 c d f g +2 c e \,f^{2}+6 a \,g^{2}\right ) {\mathrm e}^{n \ln \left (g x +f \right )}}{g^{3} \left (n^{3}+6 n^{2}+11 n +6\right )}+\frac {\left (2 c d f g \,n^{2}+a \,g^{2} n^{2}+6 c d f g n -2 c e \,f^{2} n +5 a \,g^{2} n +6 a \,g^{2}\right ) x \,{\mathrm e}^{n \ln \left (g x +f \right )}}{g^{2} \left (n^{3}+6 n^{2}+11 n +6\right )}+\frac {\left (2 d g n +e f n +6 d g \right ) c \,x^{2} {\mathrm e}^{n \ln \left (g x +f \right )}}{g \left (n^{2}+5 n +6\right )}\) | \(209\) |
risch | \(\frac {\left (c e \,g^{3} n^{2} x^{3}+2 c d \,g^{3} n^{2} x^{2}+c e f \,g^{2} n^{2} x^{2}+3 c e \,g^{3} n \,x^{3}+2 c d f \,g^{2} n^{2} x +8 c d \,g^{3} n \,x^{2}+c e f \,g^{2} n \,x^{2}+2 c e \,x^{3} g^{3}+a \,g^{3} n^{2} x +6 c d f \,g^{2} n x +6 c d \,g^{3} x^{2}-2 c e \,f^{2} g n x +a f \,g^{2} n^{2}+5 a \,g^{3} n x -2 c d \,f^{2} g n +5 a f \,g^{2} n +6 a \,g^{3} x -6 d \,f^{2} g c +2 c e \,f^{3}+6 a f \,g^{2}\right ) \left (g x +f \right )^{n}}{\left (2+n \right ) \left (3+n \right ) \left (1+n \right ) g^{3}}\) | \(223\) |
parallelrisch | \(\frac {x^{3} \left (g x +f \right )^{n} c e f \,g^{3} n^{2}+3 x^{3} \left (g x +f \right )^{n} c e f \,g^{3} n +2 x^{2} \left (g x +f \right )^{n} c d f \,g^{3} n^{2}+x^{2} \left (g x +f \right )^{n} c e \,f^{2} g^{2} n^{2}+2 x^{3} \left (g x +f \right )^{n} c e f \,g^{3}+8 x^{2} \left (g x +f \right )^{n} c d f \,g^{3} n +x^{2} \left (g x +f \right )^{n} c e \,f^{2} g^{2} n +2 x \left (g x +f \right )^{n} c d \,f^{2} g^{2} n^{2}+6 x^{2} \left (g x +f \right )^{n} c d f \,g^{3}+x \left (g x +f \right )^{n} a f \,g^{3} n^{2}+6 x \left (g x +f \right )^{n} c d \,f^{2} g^{2} n -2 x \left (g x +f \right )^{n} c e \,f^{3} g n +5 x \left (g x +f \right )^{n} a f \,g^{3} n +\left (g x +f \right )^{n} a \,f^{2} g^{2} n^{2}-2 \left (g x +f \right )^{n} c d \,f^{3} g n +6 x \left (g x +f \right )^{n} a f \,g^{3}+5 \left (g x +f \right )^{n} a \,f^{2} g^{2} n -6 \left (g x +f \right )^{n} c d \,f^{3} g +2 \left (g x +f \right )^{n} c e \,f^{4}+6 \left (g x +f \right )^{n} a \,f^{2} g^{2}}{f \left (2+n \right ) \left (3+n \right ) \left (1+n \right ) g^{3}}\) | \(382\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (84) = 168\).
Time = 0.32 (sec) , antiderivative size = 218, normalized size of antiderivative = 2.60 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {{\left (a f g^{2} n^{2} + 2 \, c e f^{3} - 6 \, c d f^{2} g + 6 \, a f g^{2} + {\left (c e g^{3} n^{2} + 3 \, c e g^{3} n + 2 \, c e g^{3}\right )} x^{3} + {\left (6 \, c d g^{3} + {\left (c e f g^{2} + 2 \, c d g^{3}\right )} n^{2} + {\left (c e f g^{2} + 8 \, c d g^{3}\right )} n\right )} x^{2} - {\left (2 \, c d f^{2} g - 5 \, a f g^{2}\right )} n + {\left (6 \, a g^{3} + {\left (2 \, c d f g^{2} + a g^{3}\right )} n^{2} - {\left (2 \, c e f^{2} g - 6 \, c d f g^{2} - 5 \, a g^{3}\right )} n\right )} x\right )} {\left (g x + f\right )}^{n}}{g^{3} n^{3} + 6 \, g^{3} n^{2} + 11 \, g^{3} n + 6 \, g^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1489 vs. \(2 (75) = 150\).
Time = 0.58 (sec) , antiderivative size = 1489, normalized size of antiderivative = 17.73 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\text {Too large to display} \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.61 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {2 \, {\left (g^{2} {\left (n + 1\right )} x^{2} + f g n x - f^{2}\right )} {\left (g x + f\right )}^{n} c d}{{\left (n^{2} + 3 \, n + 2\right )} g^{2}} + \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} g^{3} x^{3} + {\left (n^{2} + n\right )} f g^{2} x^{2} - 2 \, f^{2} g n x + 2 \, f^{3}\right )} {\left (g x + f\right )}^{n} c e}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} g^{3}} + \frac {{\left (g x + f\right )}^{n + 1} a}{g {\left (n + 1\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 366 vs. \(2 (84) = 168\).
Time = 0.27 (sec) , antiderivative size = 366, normalized size of antiderivative = 4.36 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx=\frac {{\left (g x + f\right )}^{n} c e g^{3} n^{2} x^{3} + {\left (g x + f\right )}^{n} c e f g^{2} n^{2} x^{2} + 2 \, {\left (g x + f\right )}^{n} c d g^{3} n^{2} x^{2} + 3 \, {\left (g x + f\right )}^{n} c e g^{3} n x^{3} + 2 \, {\left (g x + f\right )}^{n} c d f g^{2} n^{2} x + {\left (g x + f\right )}^{n} c e f g^{2} n x^{2} + 8 \, {\left (g x + f\right )}^{n} c d g^{3} n x^{2} + 2 \, {\left (g x + f\right )}^{n} c e g^{3} x^{3} - 2 \, {\left (g x + f\right )}^{n} c e f^{2} g n x + 6 \, {\left (g x + f\right )}^{n} c d f g^{2} n x + {\left (g x + f\right )}^{n} a g^{3} n^{2} x + 6 \, {\left (g x + f\right )}^{n} c d g^{3} x^{2} - 2 \, {\left (g x + f\right )}^{n} c d f^{2} g n + {\left (g x + f\right )}^{n} a f g^{2} n^{2} + 5 \, {\left (g x + f\right )}^{n} a g^{3} n x + 2 \, {\left (g x + f\right )}^{n} c e f^{3} - 6 \, {\left (g x + f\right )}^{n} c d f^{2} g + 5 \, {\left (g x + f\right )}^{n} a f g^{2} n + 6 \, {\left (g x + f\right )}^{n} a g^{3} x + 6 \, {\left (g x + f\right )}^{n} a f g^{2}}{g^{3} n^{3} + 6 \, g^{3} n^{2} + 11 \, g^{3} n + 6 \, g^{3}} \]
[In]
[Out]
Time = 12.08 (sec) , antiderivative size = 211, normalized size of antiderivative = 2.51 \[ \int (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx={\left (f+g\,x\right )}^n\,\left (\frac {f\,\left (2\,c\,e\,f^2-2\,c\,d\,f\,g\,n-6\,c\,d\,f\,g+a\,g^2\,n^2+5\,a\,g^2\,n+6\,a\,g^2\right )}{g^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {x\,\left (-2\,c\,e\,f^2\,g\,n+2\,c\,d\,f\,g^2\,n^2+6\,c\,d\,f\,g^2\,n+a\,g^3\,n^2+5\,a\,g^3\,n+6\,a\,g^3\right )}{g^3\,\left (n^3+6\,n^2+11\,n+6\right )}+\frac {c\,e\,x^3\,\left (n^2+3\,n+2\right )}{n^3+6\,n^2+11\,n+6}+\frac {c\,x^2\,\left (n+1\right )\,\left (6\,d\,g+2\,d\,g\,n+e\,f\,n\right )}{g\,\left (n^3+6\,n^2+11\,n+6\right )}\right ) \]
[In]
[Out]